<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue.extend扩展实例构造器</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Vue.extend扩展实例构造器</h1>
    <hr>
    <div id="author"></div>
    <author></author>

    <script type="text/javascript">
       var authorExtend=Vue.extend({
           template:"<p><a :href='authorUrl'>{{authorName}}</a></p>",
           data:function(){
               return {
                authorName:' pxs',
                authorUrl:'http://www.baidu.com'
               }
           }
       });
       new authorExtend().$mount('#author')
       new authorExtend().$mount('author')
    </script>
</body>
</html>